package taskman;

/*
 * COMP 354 Project - Team 6
 */


//Normal Function for Interface3. Default functions. All gets and sets
public class Interface3 {
	private String id;
	private String title;
	private String description;
	private double duration;
	private String deliverable;
	private String deadline;
	private String personId;

	public Interface3(String id, String title, String description, double duration,
			String deliverable, String deadline, String person) {
		this.id = id;
		this.title = title;
		this.description = description;
		this.duration = duration;
		this.deliverable = deliverable;
		this.deadline = deadline;
		this.personId = person;
	}

	public Interface3() {

	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getDuration() {
		return duration;
	}

	public void setDuration(double duration) {
		this.duration = duration;
	}

	public String getDeliverable() {
		return deliverable;
	}

	public void setDeliverable(String deliverable) {
		this.deliverable = deliverable;
	}

	public String getDeadline() {
		return deadline;
	}

	public void setDeadline(String deadline) {
		this.deadline = deadline;
	}

	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}

	public String toString() {
		return this.title + ": " + this.description + "\n Assigned to: "
				+ this.personId;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Interface3 other = (Interface3) obj;
		if (deadline == null) {
			if (other.deadline != null)
				return false;
		} else if (!deadline.equals(other.deadline))
			return false;
		if (deliverable == null) {
			if (other.deliverable != null)
				return false;
		} else if (!deliverable.equals(other.deliverable))
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (Double.doubleToLongBits(duration) != Double
				.doubleToLongBits(other.duration))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (personId == null) {
			if (other.personId != null)
				return false;
		} else if (!personId.equals(other.personId))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		return true;
	}
}
